package com.example.sxmall.dao.mapper;

import com.example.sxmall.dao.pojo.Brands;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BrandsMapper {
    /**
     * 查看品牌列表
     * @return
     */
    public List<Brands> listBrands();

    /**
     * 根据ID查询
     * @param bid
     * @return
     */
    public Brands findBrandsById(@Param("bid") Integer bid);

    /**
     * 根据品牌名称的模糊查询
     * @param bname
     * @return
     */
    public List<Brands> findBrandsByName(@Param("bname") String bname);

    /**
     * 添加
     * @param brands
     * @return
     */
    public int insertBrands(@Param("brands") Brands brands);

    /**
     * 删除
     * @param bid
     * @return
     */
    public int deleteBrands(@Param("bid") int bid);

    /**
     * 动态修改
     * @param brands
     * @return
     */
    public int updateBrands(@Param("brands") Brands brands);
}
